/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*-  */
/*
 * catchit
 * Copyright (C) 2013 Ryan Grinkewitz <graphite@Toto>
 * 
 */

#ifndef _GAME_STATE_MANAGER_H_
#define _GAME_STATE_MANAGER_H_

#include <vector>
#include <string>
#include "game-state.h"
#include "level-generator.h"

class GameStateManager
{
public:
	static GameStateManager* getInstance();
	void resetManager ();


	void update();
	void updatePlayer(int x, int y);

	void initializeState();

	GameState* getGameState();
	
	void updateGamePosition(int velocity);

	
	int getAgentState(Jumper* jumper);

	void evaluateWin();

	bool isGameWon(){return gameWon;};
	
protected:

private:

	GameState* gameState;
	
	LevelGenerator* levelGenerator;

	bool gameWon;

	GameStateManager(){};
	GameStateManager(GameStateManager const&){};
	GameStateManager& operator=(GameStateManager const&){};  
	static GameStateManager* gameStateManagerInstance;

	//Very specific function for use in determining state integer
	//see function for usage
	int getLevelPlatforms(Level* level, int agentPlatform);
};

#endif // _GAME_STATE_MANAGER_H_

